package StudyCode.summary.textfile;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ConvertAllTextInFileToUppercaseCharacters {
	public static void main(String[] arguments) {
		String sourceName = "E:/Copy/test1.txt";
		try {

			FileReader fr = new FileReader(new File(sourceName));
			BufferedReader in = new BufferedReader(fr);


			boolean eof = false;
			int inChar;
			do {
				inChar = in.read();
				if (inChar != -1) {
					char outChar = Character.toUpperCase((char) inChar);
					System.out.print(outChar);
				} else
					eof = true;
			} while (!eof);
			in.close();
		} catch (IOException | SecurityException se) {
			se.printStackTrace();
		}
	}
}
